<?php
header("Content-Type: text/html; charset=utf-8");

require_once("GoogleLanguageAPIClient.php");

$translate = new GoogleLanguageAPIClient();
$text	   = "In 1917, Einstein applied the general theory of relativity to model the structure of the universe as a whole.";
$languages = 
	array(
		"el" => "Greek",
		"it" => "Italian",
		"de" => "German",
		"fr" => "French",
		"bg" => "Bulgarian",		
		"nl" => "Dutch",
		"mt" => "Maltese"
	);

echo "<strong>English</strong>: {$text}<hr>";

foreach($languages as $code => $name) {
	echo "<strong>{$name}</strong>: \t" . $translate->translate($text, "en", $code) . "<br>";
}

?>
